package day240529;

import java.io.File;
import java.util.Arrays;

/*
* 任务2：引出 File 以及常用方法
*/
public class Test2 {
    public static void main(String[] args) {
        File file1 = new File("src/day240524");
        System.out.println(file1);
        System.out.println(file1.getName());
        System.out.println(file1.isFile());
        System.out.println(file1.isDirectory());
        String[] list = file1.list();
        System.out.println(Arrays.toString(list));

        System.out.println("=== === ===");

        File file2 = new File("src/day240524/e1/Test.java");
        System.out.println(file2);
        System.out.println(file2.getName());
        System.out.println(file2.isFile());
        System.out.println(file2.isDirectory());

        System.out.println("=== === ===");
        File file3 = new File(".DS_abc");
        System.out.println(file3.isHidden());
    }
}
